//package edu.zut.hys.auth.service;
//
//import cn.hutool.core.collection.CollUtil;
//import edu.zut.hys.auth.constant.RedisConstant;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.redis.core.RedisTemplate;
//import org.springframework.stereotype.Service;
//
//import javax.annotation.PostConstruct;
//import java.util.List;
//import java.util.Map;
//import java.util.TreeMap;
//
///**
// * 资源与角色匹配关系管理业务类
// * Created by macro on 2020/6/19.
// */
//@Service
//public class ResourceServiceImpl {
//
//    private Map<String, List<String>> resourceRolesMap;
//    @Autowired
//    private RedisTemplate<String,Object> redisTemplate;
//
//    @PostConstruct
//    public void initData() {
//        resourceRolesMap = new TreeMap<>();
//        resourceRolesMap.put("/api/hello", CollUtil.toList("ADMIN"));
//        resourceRolesMap.put("/api/user/currentUser", CollUtil.toList("ADMIN", "TEST"));
//        redisTemplate.opsForHash().putAll(RedisConstant.RESOURCE_ROLES_MAP, resourceRolesMap);
//    }
//}
